#ifndef BOSS_Afterburner_RooTruncatedPolynomial_H
#define BOSS_Afterburner_RooTruncatedPolynomial_H

#include "RooAbsPdf.h"
#include "RooRealProxy.h"

#include "RooAbsPdf.h"
#include "RooAbsReal.h"
#include "RooRealProxy.h"

class RooRealVar;

/// \f$ f(m) = (m - m_0)^a e^{-bm - cm^2} \f$
class RooTruncatedPolynomial : public RooAbsPdf
{

public:
  RooTruncatedPolynomial(const char* name, const char* title, RooAbsReal& _x, RooAbsReal& _m0,
                         RooAbsReal& _a, RooAbsReal& _b, RooAbsReal& _c);

  RooTruncatedPolynomial(const RooTruncatedPolynomial& other, const char* name = 0);

  virtual TObject* clone(const char* newname) const
  {
    return new RooTruncatedPolynomial(*this, newname);
  }

  inline virtual ~RooTruncatedPolynomial() {}

protected:
  RooRealProxy x;
  RooRealProxy m0;
  RooRealProxy a;
  RooRealProxy b;
  RooRealProxy c;

  Double_t evaluate() const;
};

#endif